package com.jia.train.batch.job;

import org.quartz.DisallowConcurrentExecution;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

@DisallowConcurrentExecution // 禁用并发执行
public class DataSourceQuartzJobA implements Job {

    public static final Logger logger = LoggerFactory.getLogger(DataSourceQuartzJobA.class);

    @Override
    public void execute(JobExecutionContext jobExecutionContext) {
        // 如果这个任务没有执行结束 下个线程不能进来执行
        logger.info("数据库执行任务的方法 A 开始: {}", jobExecutionContext);

        logger.info("数据库执行任务的方法 A 结束: {}", jobExecutionContext);
    }


}
